<?php

	include("../inc/joomlaInt_admin.php");
	include("../inc/inc_configuration.php");

if ($jUser==0)
{
	echo "Bitte zuerst einloggen!";
}
else
{
	
	$q="SELECT gid FROM $tbl_users WHERE id=$jUser";
					$qe=mysql_query($q);
					$qeo=mysql_fetch_object($qe);
					
					$gid=$qeo->gid;
					
					if ($gid!=$admingroup)
					{
						echo "Du bist kein Admin!";
						break;
					}
					
	$yearB=$_POST["yearB"];
	$yearE=$_POST["yearE"];
	$number=$_POST["number"];
	
	$q = "UPDATE $tbl_season set active=0 WHERE active=1";
	$qe = mysql_query($q);
	
	//echo $q;
	
	$q = "INSERT INTO $tbl_season (yearB, yearE, number, active) VALUES ($yearB, $yearE, $number, 1)";
	$qe = mysql_query($q);
	
	//echo"<br><br> $q";
	
	echo'Sie werden weitergeleitet... <meta http-equiv="refresh" content="0; URL=saison_verwaltung.php">';
}	
	
	
	

?>
